package com.axi.ga;

/**
 * @author Ákos Szabó - Axi - aaszabo@gmail.com
 * Dec 9, 2011
 *
 */

import java.util.Vector;

/**
 * This is for handling a DNS for GaEngine
 * A handler responsible for creating, crossing and evaluating a DNS
 */
public interface IDnsHandler 
{
	
	/**
	 * 
	 * @param argPopulationSize
	 * @return a vector of IDns. Size of the vector is the given population size.
	 */
	public Vector originatePopulation( int argPopulationSize );
	
	
	/**
	 * Crosses over the population and gives back the best
	 * @return
	 */
	public IDns crossOverPopulation();
	
	
	/**
	 * 
	 * @return Gives the best in the population.
	 */
	public IDns getTheBest();
	
	/**
	 * Crosses parents to give birth to a child
	 * @param argDns1
	 * @param argDns2
	 * @return
	 */
	public IDns crossover(IDns argDns1, IDns argDns2);
	
	
	/**
	 * Calculates the fitness value for a Dns
	 * @param argDns
	 */
	public void evaluateDns( IDns argDns );

		
}
